package com.lwj.designpattern.strategy;

/**
 * @author wujilee
 * @date 2023/2/13
 */
public class Dog implements Comparable<Dog>{
    private int food;

    public Dog(int food) {
        this.food = food;
    }
    public Dog() {

    }


    @Override
    public int compareTo(Dog o) {
        if(this.food<o.food){
            return  -1;
        }
        if(this.food>o.food){
            return  1;
        }
        return 0;
    }

    public int getFood() {
        return food;
    }

    public void setFood(int food) {
        this.food = food;
    }
}
